<template>
<div class="content">
  <div class="font-bold">less函数，居中样式共用</div>
  <div class="box-less">
    <div class="box-less-child"></div>
  </div>
  <div class="font-bold">flex布局</div>
  <div>justify-content: flex-start</div>
  <div class="flex-wrapper" style="justify-content: flex-start">
    <div class="flex-item"></div>
    <div class="flex-item"></div>
  </div>

  <div>justify-content: flex-end</div>
  <div class="flex-wrapper" style="justify-content: flex-end">
    <div class="flex-item"></div>
    <div class="flex-item"></div>
  </div>

  <div>justify-content: center</div>
  <div class="flex-wrapper" style="justify-content: center">
    <div class="flex-item"></div>
    <div class="flex-item"></div>
  </div>

  <div>justify-content: space-between</div>
  <div class="flex-wrapper" style="justify-content: space-between">
    <div class="flex-item"></div>
    <div class="flex-item"></div>
  </div>

  <div>justify-content: space-around</div>
  <div class="flex-wrapper" style="justify-content: space-around">
    <div class="flex-item"></div>
    <div class="flex-item"></div>
  </div>
  <div>justify-content: space-around</div>
  <div class="flex-wrapper" style="justify-content: space-around">
    <div class="flex-item"></div>
    <div class="flex-item"></div>
  </div>
  <div>flex-wrap: wrap</div>
  <div class="flex-wrapper flex-wrap-width" style="flex-wrap: wrap;justify-content: flex-start">
    <div class="flex-item"></div>
    <div class="flex-item"></div>
    <div class="flex-item"></div>
    <div class="flex-item"></div>
    <div class="flex-item"></div>
    <div class="flex-item"></div>
    <div class="flex-item"></div>
    <div class="flex-item"></div>
    <div class="flex-item"></div>
    <div class="flex-item"></div>
    <div class="flex-item"></div>
  </div>

  <div class="font-bold">100*100标准盒模型 margin:10 border:10</div>
  <div class="wrapper-item">
    <div class="standard-box">
    </div>
  </div>
  <div class="font-bold">100*100 ie盒模型 margin:10 border:10</div>
  <div class="wrapper-item">
    <div class="ie-box"></div>
  </div>
</div>
</template>

<script>
export default {
  name: "StyleDemo"
}
</script>

<style scoped lang="less">
@import '../style/common.less';
.content{
  *{
    box-sizing: content-box;
  }
  padding:12px;
  .box-less{
    background-color: skyblue;
    height: 36px;
    width: 36px;
    .box-less-child{
      width: 12px;
      height: 12px;
      background-color: black;
    }
    .flex-center();
  }
  .flex-wrapper{
    display: flex;
    padding:12px;
    background-color: darksalmon;
    justify-content: flex-start;
    align-items: center;
    .flex-item{
      background-color: #42b983;
      width: 30px;
      height: 30px;
      border:1px solid black;
      margin: 0 12px 12px 0;
    }
  }
  .flex-wrap-width{
    width: 132px;
    padding-right: 0;
  }
  .wrapper-item{
    border:1px solid red;
    .standard-box{
      box-sizing: content-box;
      width: 100px;
      height: 100px;
      background-color: red;
      margin:10px;
      border:10px solid black;
    }
    .ie-box{
      box-sizing: border-box;
      width: 100px;
      height: 100px;
      background-color: red;
      margin:10px;
      border:10px solid black;
    }
  }
  >* {
    margin: 0 0 12px 12px;
  }
}
</style>
